#ifndef _WX_UNIX_APPTBASE_H_
#define _WX_UNIX_APPTBASE_H_

struct wxExecuteData;
class wxPipe;

// ----------------------------------------------------------------------------
// wxAppTraits: the Unix version adds extra hooks needed by Unix code
// ----------------------------------------------------------------------------

class wxAppTraits : public wxAppTraitsBase {
  public:
    // wxExecute() support methods
    // ---------------------------

    // called before starting the child process and creates the pipe used for
    // detecting the process termination asynchronously in GUI, does nothing in
    // wxBase
    //
    // if it returns false, we should return from wxExecute() with an error
    virtual bool CreateEndProcessPipe( wxExecuteData& execData ) = 0;

    // test if the given descriptor is the end of the pipe create by the
    // function above
    virtual bool IsWriteFDOfEndProcessPipe( wxExecuteData& execData, int fd ) = 0;

    // ensure that the write end of the pipe is not closed by wxPipe dtor
    virtual void DetachWriteFDOfEndProcessPipe( wxExecuteData& execData ) = 0;
    virtual int WaitForChild( wxExecuteData& execData ) = 0;
};

#endif // _WX_UNIX_APPTBASE_H_

